#!/bin/sh
# how many time this sh script has been excuted

# circular counting
f=/tmp/sandbox/counter
if [ -s $f ]; then
        n=$(cat "$f")
        n=$(($n+1))
        if [ "$n" -ge 4 ]; then
                n=1
        fi
else
        n=1
fi
echo "$n">"$f"
echo "Run Times =$n"

case $n in
        1) user=u1 ; passwd=p1 ;;
        2) user=u2 ; passwd=p2 ;;
        *) echo "mycirc.sh: error - Invalid number" ;;
esac
echo $user+$passwd

